package net.ewon.avatar.pkgmgmt.manager;

import java.io.IOException;
import java.util.List;

import net.ewon.avatar.common.pkg.AvatarPackage;
import net.ewon.avatar.common.pkg.AvatarPackageFile;
import net.ewon.avatar.common.pkg.Version;

public interface AvatarPackageManager {
	/**
	 * The package file is not stored. Use storeAvatarPackageFile to store
	 * physical file.
	 * 
	 * @param avatarPackage
	 */
	public void store(AvatarPackage avatarPackage);

	public void storeAvatarPackageFile(AvatarPackageFile avatarPackageFile);

	public AvatarPackage getAvatarPackage(String name, Version version);

	public List<AvatarPackage> getAvatarPackages(String name);

	public AvatarPackageFile getAvatarPackageFile(String id) throws IOException;

	public List<AvatarPackageFile> getAvatarPackageFiles(List<String> fileIds)
			throws IOException;

	public void removePackage(String id);

	public void removePackageFile(String fileId);

}
